range sum of binary search tree solution